﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manager/Manager.master" AutoEventWireup="true" CodeFile="EditQuestion.aspx.cs" Inherits="Manager_EditQuestion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageHeader" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyContent" Runat="Server">
<div class="header">
        <span><span class="ico  gray spreadsheet"></span>Edit Question</span>
    </div>
    <!-- End header -->
    <div class=" clear">
    </div>
    <div class="content">        
        <p>
            <asp:Label ID="lblCategory" runat="server" Text="Category" Width="150px"></asp:Label>
            <asp:DropDownList ID="ddlCategory" runat="server">
            </asp:DropDownList>
        </p>
        <p>
            <asp:Label ID="lblQuestion" runat="server" Text="Question" Width="150px"></asp:Label>
        </p>
        <p>
            <asp:TextBox ID="txtQuestion" runat="server" MaxLength="500" Rows="1" TextMode="MultiLine"
                Width="800px"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtQuestion"
                Display="Dynamic" ErrorMessage="Question content is not empty"></asp:RequiredFieldValidator>
        </p>
        <p>
            <asp:Label ID="lblType" runat="server" Text="Multiple or Single answer?" Width="180px"></asp:Label>
            <asp:RadioButton ID="rdoSingle" runat="server" GroupName="type" Text="Single" Width="120px"
                Checked="True" />
            <asp:RadioButton ID="rdoMultiple" runat="server" GroupName="type" 
                Text="Multiple" Visible="False" />
        </p>
        <p>
            <table>
                <tr>
                    <td class="title">
                        is True?
                    </td>
                    <td class="title">
                        Content<asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="checkSelectAnswer"
                            ErrorMessage="Choose at once least answer true"></asp:CustomValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButton ID="rdo1" runat="server" GroupName="checktrue" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtAnswer1" runat="server" Width="400px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAnswer1"
                            ErrorMessage="This field is not empty"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="idAnswer1" runat="server" Visible="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButton ID="rdo2" runat="server" GroupName="checktrue" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtAnswer2" runat="server" Width="400px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtAnswer2"
                            ErrorMessage="This field is not empty"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="idAnswer2" runat="server" Visible="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButton ID="rdo3" runat="server" GroupName="checktrue" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtAnswer3" runat="server" Width="400px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtAnswer3"
                            ErrorMessage="This field is not empty"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="idAnswer3" runat="server" Visible="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButton ID="rdo4" runat="server" GroupName="checktrue" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtAnswer4" runat="server" Width="400px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtAnswer4"
                            ErrorMessage="This field is not empty"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="idAnswer4" runat="server" Visible="False"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </p>
       
        <p>
            <asp:Label ID="lblMark" runat="server" Text="Mark" Width="60px"></asp:Label>
            <asp:TextBox ID="txtMark" runat="server" Width="50px" MaxLength="3">1</asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtMark" ErrorMessage="Mark must be number" 
                ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
        </p>
        <div style="padding: 2px 0px;">
            <asp:Button ID="btnUpdate" class="uibutton normal" runat="server" 
                Text="Update question" onclick="btnUpdate_Click" />
            <asp:Button ID="btnReset" class="uibutton normal" runat="server" OnClientClick="this.form.reset();return false;"
                Text="Reset" />
        </div>
        <div class=" clear">
        </div>
    </div>
</asp:Content>

